perm filename A35.TEX[106,RWF] blob sn#807717 filedate 1985-11-01 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	\magnification\magstephalf
C00005 ENDMK
C⊗;
\magnification\magstephalf
\input macro.tex
\def\today{\ifcase\month\or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December\fi
  \space\number\day, \number\year}
\baselineskip 14pt
\rm
\line{\sevenrm a35.tex[106,phy] \today\hfill}

\bigskip
\line{{\bf Subrange Types.} (See Standard Pascal, pp.\ 101--102.)\hfill}
\bigskip
If $T$ is any ordinal type, and $A$ and $B$ are constants of type~$T$,
with $A≤B$, then $A\ldt B$ is an ordinal type, consisting of the values
of $T$ lying between $A$ and~$B$, inclusive; we call $A\ldt B$
a~{\sl subrange type\/} and $T$ its {\sl host type\/}. For example,
{\tt 1..10} is the subrange type consisting of the integers from one
to ten; {\tt 'A'..'D'} is the subrange type consisting of the first
four letters of the alphabet.

Values of a subrange type are values of the host type, and may be used
freely as such. Assignments to a variable of a subrange type are errors 
unless the value assigned belongs to the subrange, but are otherwise
like assignments to a variable of the host type.

Subrange types allow conservation of storage space for variables,
and automatic checking that values stay in a specified range.

[Examples?]


\bigskip
\parindent0pt
\copyright 1984 Robert W. Floyd

First draft September 24, 1984

\bye